
export interface BubbleSpanVData<T> {
  title: string;
  extraData: T
  // backgroundColor: string | Color;
  backgroundColor: string;

  // static count: number = 0;
  id: number
}

let bubbleCount = 0;

export function generateBubbleVData<T>(title: string, extraData: T): BubbleSpanVData<T> {
  const backgroundColor = '#66' + Math.random().toString(16).slice(2, 8);
  let vData: BubbleSpanVData<T> = {
    title: title,
    extraData: extraData,
    backgroundColor: backgroundColor,
    id: ++bubbleCount
  }
  return vData;
}
